/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package SarasGlass;

/**
 *item class
 * @author Yerong
 * @since 10/11/2016
 */
public class item {
    //Declear necessary variables
    private int id = 0;
    private int quantity = 0;
    private double price = 0.0;
    private double sub = 0.0;
    /**
     * Constructor for item class
     * @author Yerong
     * @param id this is the invoice number
     * @param quantity number of items
     * @param price the price for single item
     * 
     */
    public item(int id, int quantity, int price){
        this.id = id;
        this.quantity = quantity;
        this.price = price;
        this.sub = 0;
    }
    
    /**
     * get_id
     * @return int id the invoice number
     */
    public int get_id(){
        return id;
    }
    /**
     * set quantity for certain item
     * @author Yerong
     * @param quantity number of items
     */
    public void set_quantity(int quantity){
        this.quantity = quantity;
    }
    /**
     * Set quantity for certain item
     * @author Yerong 
     * @return int quantity
     */
    public int get_quantity(){
        return quantity;
    }
    
    /**
     * Get price for certain item
     * @author Yerong
     * @return double price 
     */
    public double get_price(){
        return price;
    }
    
    /**
     * Set subtotal for certain item
     * @author Yerong
     * @param sub subtotal for certain item type
     */
    public void set_sub(int sub){
        this.sub = sub;
    }
    /**
     * Get subtotal for single item
     * @author Yerong
     * @return subtotal double type
     */
    public double get_sub(){
        return sub;
    }
}
